<template>
  <footer class="footer">
    <span class="todo-count"
      >剩余<strong>数量值{{ list.length }}</strong></span
    >
    <ul class="filters" @click="fn">
      <li>
        <a :class="{selected:isSel==='all'}" href="javascript:;" @click="isSel='all' ">全部</a>
      </li>
      <li>
        <a :class="{selected:isSel==='no'}" href="javascript:;"  @click="isSel= 'no' ">未完成</a>
      </li>
      <li>
        <a  :class="{selected:isSel==='yes'}" href="javascript:;"  @click="isSel= 'yes' ">已完成</a>
      </li>
    </ul>
    <button class="clear-completed" @click="clearfn">清除已完成</button>
  </footer>
</template>

<script>
export default {
  props: ["list"],
 data () {
  return {
     isSel:'all'
     //我想要点击底部 影响页面更新  
  }
 },
 methods:{
  fn(){//筛选数据用的
    this.$emit('chengtype',this.isSel)
  },
  clearfn(){
    this.$emit('clear')
  }
 }
};
</script>